@charset "utf-8";

.mh-rate {
  list-style: none;
  display: inline-block;
  margin: 0;
  padding: 0;
  outline: none;
}

.mh-rate-star {
  position: relative;
  display: inline-block;
  margin: 0;
  margin-right: 8px;
  padding: 0;
  cursor: pointer;
  transition: all .3s;
  
  & > div {
    &:focus {
      outline: none;
      transform: scale(1.1);
    }
    
    &:hover {
      transform: scale(1.1);
    }
  }
}

.mh-rate-star-first {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
}

.mh-rate-star-first,
.mh-rate-star-second {
  transition: all .3s;
  user-select: none;
  
  &:focus {
    outline: none;
  }
  
  .mh-icon {
    vertical-align: middle;
    
    &:focus {
      outline: none;
    }
  }
}

.mh-rate-star-full {
  .mh-rate-star-first,
  .mh-rate-star-second {}
}

.mh-rate-star-zero {
  .mh-rate-star-first,
  .mh-rate-star-second {
    .mh-icon-star {
      &:before {
        background: url(#{$img-path}/icons/star1.png) 26px -2px;
      }
    }
  }
}

.mh-rate-star-half {
  .mh-rate-star-first,
  .mh-rate-star-second {
    opacity: 1；
  }
  
  .mh-rate-star-first {
    opacity: 1;
  }
  .mh-rate-star-second {
    opacity: 1;
    
    .mh-icon-star {
      &:before {
        background: url(#{$img-path}/icons/star1.png) 26px -3px;
      }
    }
  }
}